package praktikumid.w09.p4.interface_example;

/**
 * Abstract class for animals. Every animal
 * has methods described here.
 * @author Ago
 *
 */
public abstract class Animal {
	/**
	 * Eat method. This is an abstract
	 * method, which means there is no
	 * implementation (body). Every
	 * class which extends Animal
	 * should implement this method
	 * (if the extending class itself
	 * is not abstract).
	 * 
	 * The reason why we have abstract
	 * method (we force to implement this
	 * method in every subclass) is that
	 * every animal eats, but in a different
	 * way (or eats different stuff).
	 */
	public abstract void eat();
	
	/**
	 * Animal sleeps. Most of the animals
	 * sleep in the same way (in our world).
	 * Therefore, we have implemented the 
	 * method here (although in this concrete
	 * example, our implementation is empty,
	 * but ignore that). Even if some animals
	 * sleep differently, they can override
	 * this method. But as most of them sleep
	 * in the same way, it's reasonable to
	 * describe (implement) it here.
	 */
	public void sleep() {
		// close eyes
	}
}
